package cn.sumpu.app.coolsk.dao;

import java.util.*;
import cn.sumpu.app.coolsk.domain.*;
import cn.sumpu.app.coolsk.exception.AppBusinessException;

public interface ChannelDao {

	/**
	 * author BruceZhang
	 * @param channel	频道
	 * 添加频道
	 * @throws AppBusinessException
	 */
	void addChannel(Channel channel)throws AppBusinessException;
	
	/**
	 * author BruceZhang
	 * @param channel	频道
	 * 更新频道
	 * @throws AppBusinessException
	 */
	void updateChannel(Channel channel)throws AppBusinessException;
	
	/**
	 * author BruceZhang
	 * @param parent
	 * @return	返回频道树结构
	 * @throws AppBusinessException
	 */
	List<Channel> getChannelAll(String parent)throws AppBusinessException;
	//查询频道树(排除栏目)
	List<Channel> getOnlyChannelAll(String parent)throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param parent
	 * @return	查询频道子节点
	 * @throws AppBusinessException
	 */
	List<Channel> getChildChannel(Map<String, Object> map)throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param id	频道ID
	 * @return		根据ID查询频道
	 * @throws AppBusinessException
	 */
	Channel getChannelById(String id)throws AppBusinessException;
	//根据mark查询频道
	Channel getChannelByMark(String mark)throws AppBusinessException;
	
}
